package com.lry.router;

import com.lry.client.RpcClient;

import java.util.List;
import java.util.Random;

public class RandomRouter implements Router{

    Random random = new Random();

    @Override
    public RpcClient select(List<RpcClient> rpcClients) {
        int index = random.nextInt(rpcClients.size());
        return rpcClients.get(index);
    }

}
